/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.vti.sisp_sicrim.model.entity;

import br.com.crud4j.core.model.Model;
import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.Size;

/**
 *
 * @author ednardomatos
 */
@Entity
@Table(name = "t_tipo_logradouro", catalog = "desenvolvimento", schema = "e_apoio")
@SequenceGenerator(name = "seq_tipo_logradouro", sequenceName = "e_sisp_sicrim.seq_tipo_logradouro", initialValue = 1, allocationSize = 1)
public class TipoLogradouro implements Model<Integer> {
    
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
    @Basic(optional = false)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_tipo_logradouro")
    private Integer id;
    
    @Size(max = 60)
    private String descricao;

    public TipoLogradouro() {
    }

    public TipoLogradouro(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TipoLogradouro)) {
            return false;
        }
        TipoLogradouro other = (TipoLogradouro) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.vti.sisp_sicrim.model.entity.TipoLogradouro[ id=" + id + " ]";
    }
    
}
